<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>类</title>
	</head>
	<body>
		<script type="text/javascript">
			function Person(name,age) {
				this.name=name;
				this.age=age;	
			}
			Person.prototype.hello=function () {
				console.log("大家好！")
			}
			var p1=new Person("孙悟空",500);
			var p2=new Person("猪八戒",300);
			console.log(p1.constructor.name);
		</script>
	</body>
</html>
